home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d21
/
qostnote.arc
/
ENVIRON.TEC
< prev
next >
Wrap
Text File
|
1990-07-05
|
4KB
|
91 lines
DESQVIEW 2.0 TECHNICAL NOTE
Setting The Environment
When you open a window in DESQview that uses COMMAND.COM to load,
DESQview starts with the default COMMAND.COM environment. In this
new environment DESQview sets the COMSPEC to the default (the
drive you booted from) and then sets the DOS PATH as it was
before entering DESQview, adding the path of the "Command to
start program" (if any), and the DESQview subdirectory to the end
of the path. The two extra entries are added to be sure that the
program will get loaded (in case the "Directory.:" is different
from the one used to load the program) and that any DESQview
loaders (LS-LOAD.COM for instance) will be found if needed.
At this point, the environment may be changed by the user.
Unlike DOS, the size of the environment is practically unlimited
(well, actually it's 32K) until a program (including a batch
file) is started. Then the size of the environment is fixed at
the current value. Any changes made will not have any effect on
any other DESQview windows. This is all part of creating a
system in which the windows are autonomous.
SETTING ENVIRONMENT IN THE WINDOWS
If you need to have a special environment in your window (through
the use of the SET command for example), you may do so by
starting up your program with a batch file that first sets the
environment and then starts the program. This generally works
just fine unless you need more environment space than is
available when the batch file is started. If so then you run
"out of environment space". This problem and its solution will
be discussed later in this document.
"INHERITING" ENVIRONMENT BY USING DESQVIEW'S LOADER
If you load your programs directly in DESQview, (see page 109 of
the DESQview Version 2 manual, bottom of the page), then the
programs will end up running with the environment that was
current in DOS before you ran DESQview. The direct load feature
is automatically invoked whenever the "Command to start program"
contains a full, executable file specification (Example 123.EXE)
and the option "Close on exit to DOS" is set to "Y". If your
program can be loaded in this fashion, set up your environment
before entering DESQview and directly load the program. That is
all that need be done. Programs loaded in this fashion also load
faster and have more memory available to them than those with the
extra COMMAND.COM overhead.
DESQVIEW 2.0 TECHNICAL NOTE
IF YOU RUN "OUT OF ENVIRONMENT SPACE"
If you have the problem of being out of environment space when
using a batch file which sets the environment in the window,
there are three possible solutions:
(1) Use a DESQview script
Since a window started with COMMAND.COM can have its
environment space "grow" as needed, a DESQview script can be used
to make the necessary PATH and SET statements. This can be
especially useful if you use an automatic startup script for the
window (see page 89). The script does not need to be assigned to
an actual keyboard character (many people use {250} for this
script by HOLDING DOWN the Alt key and pressing 2 5 0 on the
keypad). This script can set all the environment variables it
needs (maybe with variable pauses too), and then start the
program for you.
(2) Load COMMAND.COM as a program
Since a program loaded directly by DESQview inherits the
environment which existed before DESQview was started,
COMMAND.COM can be loaded as the program and thus have the proper
variables set. This is done by setting the "Command to start
program" to \COMMAND.COM and setting "Close on exit to DOS" to
"Y". If you want a batch file to be started, then the
"Parameters" line may have "/C file.BAT", which starts the batch
file running.
(3) Using DOS 3.2 or 3.3 /E:n
If you are using DOS 3.2 or higher then it is possible to
"load COMMAND.COM as a program" (as described in #2) and use then
"/E:n" parameter (where n is the size of the environment) to set
the size of the environment for that session of COMMAND.COM to a
larger value.
* * * * END OF FILE * * * *